package com.sxt.springcloud.opd;


import com.sxt.opd.vo.RecordVo;
import com.sxt.springcloud.opd.fallback.RecordClientFallbackService;
import com.sxt.sys.common.DataGridView;
import com.sxt.sys.common.ResultObj;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@Component
@FeignClient(value = "SPRINGCLOUD-PROVIDER-OPD",fallbackFactory = RecordClientFallbackService.class)
@RequestMapping("/p/record")
public interface RecordClientService {
    /**
     * 查询
     */
    @RequestMapping("loadAllRecord")
     DataGridView loadAllRecord(@RequestBody RecordVo recordVo);

    /**
     * 添加
     */
    @RequestMapping("addRecord")
     ResultObj addRecord(@RequestBody RecordVo recordVo);

    /**
     * 修改
     */
    @RequestMapping("updateRecord")
     ResultObj updateRecord(@RequestBody RecordVo recordVo);

    /**
     * 删除
     */
    @RequestMapping("deleteRecord")
     ResultObj deleteRecord(@RequestParam("id") Integer id);

}
